<template>
  <form>
    <md-card>
      <md-card-header :data-background-color="dataBackgroundColor">
        <h5 class="title">基本信息</h5>
      </md-card-header>

      <md-card-content>
        <div class="md-layout">
          <div class="md-layout-item md-small-size-100 md-size-33">
            <md-field>
              <label>申请编号</label>
              <md-input v-model="formdata.applycd" disabled></md-input>
            </md-field>
          </div>
          <div class="md-layout-item md-small-size-100 md-size-33">
            <md-field>
              <label>客户姓名</label>
              <md-input v-model="formdata.customername" type="text"></md-input>
            </md-field>
          </div>
          <div class="md-layout-item md-small-size-100 md-size-33">
            <md-field>
              <label>申请日期</label>
              <md-input v-model="formdata.applydate" type="email"></md-input>
            </md-field>
          </div>
          <div class="md-layout-item md-small-size-100 md-size-33">
            <md-field>
              <label>放款金额</label>
              <md-input v-model="formdata.amount" type="text"></md-input>
            </md-field>
          </div>
          <div class="md-layout-item md-small-size-100 md-size-33">
            <md-field>
              <label>放款期限</label>
              <md-input v-model="formdata.period" type="text"></md-input>
            </md-field>
          </div>
          <div class="md-layout-item md-small-size-100 md-size-33">
            <md-field>
              <label>开户银行</label>
              <md-input v-model="formdata.bank" type="text"></md-input>
            </md-field>
          </div>
          <div class="md-layout-item md-size-100">
            <md-field maxlength="5">
              <label>备注</label>
              <md-textarea v-model="formdata.remark"></md-textarea>
            </md-field>
          </div>
          <div class="md-layout-item md-size-100 text-right">
            <md-button class="md-raised md-success" v-on:click="saveClick">保存</md-button>
          </div>
        </div>

      </md-card-content>
    </md-card>
  </form>
</template>
<script>
export default {
  name: 'base-info-form',
  props: {
    dataBackgroundColor: {
      type: String,
      default: ''
    },
    formdata: {}
  },
  methods: {
    saveClick: function () {
      var _this = this
      this.$http({
        method: 'post',
        url: 'http://localhost:9090/article/test/saveApply',
        dataType: 'json',
        data: this.formdata
      }).then(function (res) {
        // alert(JSON.stringify(res.data.returnData));
        console.log(res.data.returnData)
        // Vue.set(data,'applylist', res.data.returnData.list)
        // _this.baseinfo = res.data.returnData.list[0];
        alert('保存成功!')
        _this.$router.push({path: '/table/', query: {flg: 1}})
      })
    }
  }

}

</script>
<style>

</style>
